﻿using System;
using System.Linq;

namespace Service.Model
{
	public class ServiceModel : IDisposable
	{
		public IQueryable<State> States { get { return FederatedOData.RedirectQueryToFederationMember(c => c.States); } }
		public IQueryable<County> Counties { get { return FederatedOData.RedirectQueryToFederationMember(c => c.Counties); } }
		public IQueryable<City> Cities { get { return FederatedOData.RedirectQueryToFederationMember(c => c.Cities); } }
		
		public void Dispose()
		{
			FederatedOData.ReleaseDataContext();
		}
	}
}